<template>
  <div class="">
    <div class="tabs-body">
      <div class="index_main">
        <div class="phone_box">
          <div class="header_img">
            <img src="@/static/dy/jifen_header.png" alt />
            <div class="tixing"></div>
          </div>
          <div class="card_info">
            <img src="@/static/dy/top_img.png" alt />
          </div>
          <div class="intg_box">
            <div class="statusBox">
              <div class="status_edit">
                <div class="editBox">
                  <el-button type="primary" @click="addClass">编辑</el-button>
                </div>
              </div>
              <!-- <img src="@/static/dy_status.png" alt=""> -->
              <div class="heaTable">
                <img src="@/static/dy/Group 220232.png" alt="">
                <div class="txt">{{classTitle}}</div>
                <img src="@/static/dy/Group 220232.png" alt="">
              </div>
            </div>
            <div class="chestList">
              <div class="property_box" v-for="(item, index) in punchActivityList" :key="index + 'p'">
                <div class="property_box_h">
                  <div class="tou_in">
                    <img :src="item.shopLogo" alt="">
                    <p>{{ item.shopName }}</p>
                  </div>
                </div>
                <div class="property_box_main">
                  <img class="property_box_l" :src="item.cover" alt="">
                  <div class="property_box_r">
                    <div class="property_box_r_title ">
                      <div class="zhelou" v-if="item.discount > 0 && item.discount < 7">
                        <img src="@/static/zhe_bg_1.png" alt="" />
                        <span>{{ item.discount }}折</span>
                      </div>
                      <p class="name ellipseHide_two" v-if="item.functionType == 4 || item.functionType == 3">{{
                        item.name }}</p>
                      <div class="property_box_r_title ellipseHide_two"
                        v-if="item.functionType == 1 || item.functionType == 2">{{ item.cardName }}</div>
                    </div>
                    <div class="property_box_r_detail_new">
                      <div class="mon_box">
                        <div class="money">
                          <template v-if="item.subsidyStatus == 2">
                            <span class="min_m">￥</span><span class="max_m">{{ item.price }}</span>
                          </template>
                          <template v-if="item.subsidyStatus == 1">
                            <div v-if="item.payType == 1"><span class="min_m">￥</span><span class="max_m">{{ item.cashAmount }}</span></div>
                            <div v-if="item.payType == 2">
                              <span class="min_m">￥</span><span class="max_m">{{ item.cashAmount }}</span>
                              <span class="min_m">+{{ item.integralAmount }}椰分</span>
                            </div>
                            <div v-if="item.payType == 3"><span class="max_m">{{ item.integralAmount }}椰分</span></div>
                          </template>
                          <span class="old_m" v-if="item.equityWorth">￥{{ item.equityWorth }}</span>
                        </div>
                        <div class="shen_m" v-if="item.save > 0">共省{{ item.save }}元</div>
                      </div>
                      <div class="qiang_box" v-if="item.sellStatus">
                        <p class="p1">马上抢</p>
                        <p class="p2" v-if="item.give">立赚{{ item.give }}{{ item.giveType == 1 ? 'CoCo' : '椰分' }}</p>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <integral-class-diglog v-if="classDiglog" :visible.sync="classDiglog" @success="_handleSuccess" />
  </div>
</template>
<script>
import {
  advertiseList,
  navigationList,
  integralClassListH5,
  classificationDetail,
  indexType,
  modifyIndexType,
} from "@/api/incentiveManagement/dyConfig";

import integralClassDiglog from "./integralClassDiglog";

export default {
  name: "shopDetail",
  components: {
    integralClassDiglog
  },
  props: {},
  data() {
    return {
      bannerList: [],
      navigationList: [],
      punchActivityList: [], //分类列表
      classDiglog: false,
      classTitle: '积分兑换'
    };
  },
  watch: {},
  created() {
    this.getList()
    // this.getDetail()
  },
  mounted() { },
  methods: {
    //NFR推荐列表
    getList() {
      integralClassListH5().then((res) => {
        this.punchActivityList = res.result.configList;
        this.classTitle = res.result.name ? res.result.name : '积分兑换'
      });
    },
    //编辑分类
    addClass() {
      this.classDiglog = true
    },
    _handleSuccess() {
      this.getList()
      // this.getDetail()
    },
  },
};
</script>
<style lang="scss" scoped>
.tabs-body {
  background-color: #fff;
  padding: 20px;
}
.phone_box {
  width: 395px;
  min-height: 1000px;
  border-radius: 30px;
  border: 10px solid #333;
  margin: 40px 200px 0 100px;
  background: #f5f8fe;
  box-sizing: border-box;
  overflow: hidden;
}

.tixing {
  position: absolute;
  top: 0;
  left: 116px;
  width: 145px;
  height: 0;
  border-radius: 2px;
  border-top: 20px solid #333;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
}

.header_img {
  width: 100%;
  position: relative;

  img {
    width: 100%;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
  }
}
.turntable_bj{
  width: 100%;
}
.card_info {
  width: 100%;
  img{
    width: 100%;
  }
}
.intg_box{
  
  padding: 0 0 14px 0;
  .statusBox {
      width: 100%;
      height: 58px;
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      .heaTable {
        display: flex;
        justify-content: center;
        align-items: center;
        .txt {
          
          color: #222;
          font-size: 17px;
          font-weight: 600;
          text-align: center;
          margin: 0 12px;
        }
        img {
          width: 17px;
        }
      }
      img {
        width: 100%;
        height: 100%;
      }
    }
    .statusBox:hover {
      .status_edit {
        display: block;
      }
    }
 
}
.status_edit {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9;
  display: none;
  background: rgba(0, 0, 0, 0.4);

  .editBox {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
.chestList {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.property {
    padding: 11px 15px 0;
  }
  
  .property_box {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    padding: 15px 12px;
    margin-bottom: 14px;
    background-color: #ffffff;
    width: 345px;
  }
  
  .property_box_h {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid#E1E1E1;
    height: 50px;
  
    .tou_in {
      display: flex;
      justify-content: flex-start;
      align-items: center;
  
      img {
        width: 28px;
        height: 28px;
        border-radius: 4px;
        margin-right: 8px;
      }
    }
  
    .jv_li {
      border: 1px solid #C4BFFF;
      padding: 0 3px;
      border-radius: 3px;
      height: 20px;
      line-height: 20px;
      color: #4738FA;
      font-size: 12px;
    }
  }
  
  .property_box_main {
    display: flex;
    padding-top: 12px;
  }
  
  .property_box_l {
    width: 92px;
    height: 95px;
    border-radius: 4px;
  }
  
  .property_box_r {
    flex: 1;
    padding: 0 0 0 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .property_box_r_title {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 7px;
  
    // height: 44px;
    .name {
      font-size: 15px;
      color: #222222;
      font-weight: bold;
      line-height: 22px;
      margin-left: 8px;
      flex: 1;
      width: 0;
    }
  
    .zhelou {
      width: 44px;
      height: 20px;
      position: relative;
  
      img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
      }
  
      span {
        display: block;
        width: 100%;
        height: 20px;
        line-height: 20px;
        text-align: center;
        color: #FF2521;
        font-size: 11px;
        padding-left: 10px;
        position: relative;
      }
    }
  }
  
  .property_box_r_money {
    font-size: 13px;
    color: #ff3a3a;
  }
  
  .current_price {
    font-size: 17px;
    color: #ff3a3a;
    font-weight: bold;
  }
  
  .original_price {
    color: #838285;
    font-size: 12px;
    text-decoration: line-through;
    margin-left: 4px;
  }
  
  .property_box_r_buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .property_box_r_buy_button {
    width: 70px;
    height: 24px;
    border-radius: 100px;
    background: #ffeec3;
    color: #ef2d29;
    font-size: 14px;
    text-align: center;
    line-height: 24px;
  }
  
  .property_box_r_detail {
    display: flex;
    align-items: center;
    border-radius: 50px;
    height: 30px;
    margin-top: 8px;
  }
  
  .property_box_r_detail_l {
    background: linear-gradient(108deg, #ffa644 11.85%, #eb3d3c 54.64%);
    color: #ffffff;
    font-size: 13px;
    display: flex;
    align-items: center;
    padding: 0 13px 0 12px;
    height: 30px;
    border-radius: 50px 0 0 50px;
    margin-right: -6px;
    line-height: 30px;
  }
  
  .exclamation_point_img {
    width: 17px;
    height: 17px;
    margin-left: 4px;
  }
  
  .property_box_r_detail_r {
    background: url("/static/property_box_r_detail_r.png") no-repeat;
    background-size: 100% 100%;
    color: #ef2d29;
    font-size: 13px;
    height: 31px;
    text-align: center;
    line-height: 31px;
    width: 89px;
    border-radius: 0 50px 50px 0;
  }
  
  .property_box_r_detail_new {
    widows: 220px;
    height: 40px;
    // background: #FCF4F0;
    // border-radius: 100px;
    display: flex;
    justify-content: space-between;
    overflow: hidden;
  
    .mon_box {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
      margin-left: 10px;
  
      .money {
        display: flex;
        justify-content: flex-start;
        align-items: baseline;
  
        .min_m {
          font-size: 12px;
          color: #FF3A3A;
        }
  
        .max_m {
          font-size: 19px;
          font-weight: 600;
          color: #FF3A3A;
        }
  
        .old_m {
          font-size: 12px;
          color: #B67E7E;
          text-decoration: line-through;
          margin-left: 4px;
        }
      }
  
      .shen_m {
        font-size: 12px;
        color: #FF3A3A;
      }
    }
  
    .qiang_box {
      background: linear-gradient(90deg, #EA664B -9.85%, #EA4B3D 100.5%);
      // width: 102px;
      height: 36px;
      border-radius: 100px;
      padding: 0 6px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      position: relative;
  
      // background: url("../../../../static/qiang_bg.png") no-repeat;
      .p1 {
        font-size: 14px;
        font-weight: 600;
        color: #fff;
        position: relative;
        z-index: 99;
      }
  
      .p2 {
        font-size: 11px;
        color: #fff;
        position: relative;
        z-index: 99;
      }
  
      img {
        width: 102px;
        height: 40px;
        position: absolute;
        top: 0;
        left: 0;
      }
    }
  }

/* 资产列表end */
</style>
      